sysroot: Stabilize deployment finalization, add API and CLI
authorColin Walters <walters@verbum.org>
Wed, 8 Nov 2023 22:19:19 +0000 (17:19 -0500)
committerColin Walters <walters@verbum.org>
Mon, 27 Nov 2023 15:59:56 +0000 (10:59 -0500)
commit28cc761806e1c87f106c82cc08cbf0dab30344b6
tree98b710abc6f20e82f2b7ee31c3fa984d1008f6f9
parent1ca4f02a69cb634ab51af44bdf9def2aad1680be
sysroot: Stabilize deployment finalization, add API and CLI

It's about time we do this; deployment finalization locking
is a useful feature.  An absolutely key thing here is that
we've slowly been moving towards the deployments as the primary
"source of truth".

Specifically in bootc for example, we will GC container images
not referenced by a deployment.

This is then neecessary to support a "pull but don't apply automatically" model.

This stabilizes the existing `ostree admin deploy --lock-finalization`
CLI, and adds a new `ostree admin unlock-finalization`.

We still check the old lock file path, but there's a new boolean
value as part of the staged deployment data which is intended
to be the source of truth in the future.  At some point then we
can drop the rpm-ostree lockfile handling.

Closes: https://github.com/ostreedev/ostree/issues/3025
19 files changed:
Makefile-man.am
Makefile-ostree.am
apidoc/ostree-sections.txt
man/ostree-admin-deploy.xml
man/ostree-admin-lock-finalization.xml [new file with mode: 0644]
src/libostree/libostree-devel.sym
src/libostree/ostree-deployment-private.h
src/libostree/ostree-deployment.c
src/libostree/ostree-deployment.h
src/libostree/ostree-sysroot-deploy.c
src/libostree/ostree-sysroot-private.h
src/libostree/ostree-sysroot.c
src/libostree/ostree-sysroot.h
src/ostree/ot-admin-builtin-deploy.c
src/ostree/ot-admin-builtin-lock-finalization.c [new file with mode: 0644]
src/ostree/ot-admin-builtin-status.c
src/ostree/ot-admin-builtins.h
src/ostree/ot-builtin-admin.c
tests/kolainst/destructive/staged-deploy.sh